package com.ruoyi.project.erp.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class MyWorkedOnTaskVO { // 名称更能反映内容
    // --- 任务本身的信息 (保持不变) ---
    private Long id;
    private String projectId;
    private String projectName;
    private String taskCode;
    private String taskName;
    private String taskDesc;
    private String status;
    private String priority;
    private String startTime;
    private String endTime;

    // --- 新增的聚合工时信息 ---
    /** 我为该任务填报的总工时 */
    @Excel(name = "我的总工时")
    private BigDecimal myTotalHours;

    /** 我为该任务填报的加班工时 */
    @Excel(name = "我的加班工时")
    private BigDecimal myOvertimeHours;

    /** 我为该任务填报的工时次数 */
    @Excel(name = "工时填报次数")
    private Integer worklogCount;

    /** 我最近一次为该任务填报工时的日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最近工作日", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastWorkDate;
}

